package org.example.firstproject.service;


import org.example.firstproject.dao.UserDao;
import org.example.firstproject.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {

    @Autowired
    private UserDao userDao;

    public List<User> getAllUser(){
        List<User> userList = userDao.getAllUser();
        return userList;
    }

    public User getUserById(String id){
        return userDao.getUserByid(id);
    }
}
